FROM openjdk:11
MAINTAINER Hector <spiniper@126.com>
VOLUME /tmp 
ENV NARS_DB_DRIVER "org.postgresql.Driver"
ENV NARS_DB_URL "jdbc:postgresql://172.31.31.107:5432/ustudy?currentSchema=ustudy_cloud"
ENV NARS_DB_USER postgres
ENV NARS_DB_PASSWORD Postgres@Ustudy
ENV NARS_REGISTER true
ENV NARS_CONTEXT_PATH "/nars_api"
ENV NARS_REGISTER_KEY MelonLibKey
ENV NARS_REGISTER_SECRET MelonLibSecret
ENV NARS_WORKER_ID 1
ENV NARS_DATA_ID 1
ENV NARS_PORT 8080
# 将jar包添加到容器中并更名为app.jar
ADD nars.jar app.jar
# 运行jar包
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
